package process;

import java.util.ArrayList;
import java.util.regex.Pattern;

public class PatternResult {

	public Pattern pattern;
	
	private ArrayList<Integer> starts, ends;	
	
	public PatternResult(Pattern pattern){
		starts = new ArrayList<Integer>();
		ends = new ArrayList<Integer>();
		this.pattern = pattern;
	}
	
	public void addResult(int start, int end){
		this.starts.add(start);
		this.ends.add(end);
	}
	
	public int getStartAt(int index){
		return starts.get(index);		
	}
	
	public int getEndAt(int index){
		return ends.get(index);		
	}
	
	public int getResultsSize(){
		return starts.size();
	}
}
